#include<stdio.h>
#include<stdlib.h>

typedef int TyieeyarEnm[];
typedef int ZnfuuNpinG;
TyieeyarEnm tyiEnum_11 = {2,7,0,6,8,9,4,5};
TyieeyarEnm tyiEnum_12 = {6,8,0,4,5};

struct Tylrk{
	int *ptnm;
	int i,n;
}
ptyi_11={tyiEnum_11,0,8},
ptyi_12={tyiEnum_12,0,5};

typedef struct tyiLinkyi{
	int tyinum;
	struct tyiLinkyi *Lisster;
}*lptLinkyi,tLinkyi;

lptLinkyi LivrALank(int tnm){
	lptLinkyi lpt;
	lpt = (lptLinkyi)malloc(sizeof(tLinkyi));
	lpt->tyinum = tnm;
	lpt->Lisster = NULL;
	return lpt;
}

lptLinkyi Atyli_OreXyer(int const*tyinum1,int const*tyinum2){
	static int Loopir_ing = 0;
	lptLinkyi lpt = (lptLinkyi)malloc(sizeof(tLinkyi));
	lpt->Lisster = NULL;
	lpt->tyinum = 0;
	if(tyinum1!=NULL)lpt->tyinum += *tyinum1;
	if(tyinum2!=NULL)lpt->tyinum += *tyinum2;		
	if(Loopir_ing!=0)lpt->tyinum += Loopir_ing;
	else if(tyinum1==NULL&&tyinum2==NULL){
		free(lpt);
	}
	Loopir_ing = 0;
	if(lpt->tyinum>=10){
	    Loopir_ing = lpt->tyinum / 10;
	    lpt->tyinum %= 10;
	}
	return lpt;
}

int main(int argc,char**argv){
	lptLinkyi TriViralief=NULL,
	lp1=NULL,lp2=NULL,flp1=NULL,flp2=NULL,lptf=NULL,lpt=NULL,
	lpt1=NULL,lpt2=NULL,lpt0=NULL;
	ZnfuuNpinG munf,torf;
	int *Enndetar;
	int i,n;
	for(;ptyi_11.i < ptyi_11.n;){
		lp1 = LivrALank(ptyi_11.ptnm[ptyi_11.i++]);
		if(lpt1==NULL)lpt1 = lp1;
		lp1 = lp1->Lisster;
	}
	for(;ptyi_12.i < ptyi_12.n;){
		lp2 = LivrALank(ptyi_12.ptnm[ptyi_12.i++]);
		if(lpt2==NULL)lpt2 = lp2;
		lp2 = lp2->Lisster;
	}
	lpt = TriViralief;
	lp1 = lpt1;
	lp2 = lpt2;
		flp1 = lp1;
		flp2 = lp2;
		lptf = lpt;
	for(i=0,n=0;i<(ptyi_11.n)||i<(ptyi_12.n);i++,n++){
		munf = (flp1!=NULL)?(flp1->tyinum):0;
		torf = (flp2!=NULL)?(flp2->tyinum):0;
		if(lptf==NULL)lptf = Atyli_OreXyer(&munf,&torf);
		if(flp1!=NULL)lp1=flp1,flp1 = flp1->Lisster;
		if(flp2!=NULL)lp2=flp2,flp2 = flp2->Lisster;
		lptf = lptf->Lisster;
		if(lp1!=NULL)free(lp1);
		if(lp2!=NULL)free(lp2);
	}
	if(lptf==NULL)
	    lptf = Atyli_OreXyer(NULL,NULL);
	if(lptf->tyinum!=0)n++;
	lptf = lptf->Lisster;
	if(lptf!=NULL)lptf = lptf->Lisster;
	Enndetar = (int*)malloc(sizeof(int)*n);
	lpt0 = TriViralief;
	printf("[");
	for(i=0;i<n;i++){
		if(lpt0!=NULL)
		*(Enndetar+i) = lpt0->tyinum;
		if(i<n-1)
		printf("%d,",Enndetar[i]);
		else
		printf("%d]",Enndetar[i]);
		lpt = lpt0;
		lpt0 = lpt0->Lisster;
		free(lpt);
	}
	return 0;
}